package com.xiubai.appforpda.entity;

import java.util.ArrayList;
import java.util.List;

/**
 * @author: r3562939
 * @version: V1.0
 * @project: AppForPda
 * @description: 组织架构类
 * @date: 2018/11/18
 * @time: 15:16
 */
public class StructureEntity {
    public int id;
    public String pid;
    // 部门名称
    public String deptname;
    public String deptcode;

    public boolean isSelected = false;

    public SQLOrgStructureBean structureBean;

    public List<StructureEntity> structureBeans = new ArrayList<>();

    public List<PersonEntity> personEntities= new ArrayList<>();


    @Override
    public boolean equals(Object obj) {
        if (obj instanceof StructureEntity) {
            StructureEntity bean = (StructureEntity) obj;
            return deptcode.equalsIgnoreCase(bean.deptcode);
        }
        return false;
    }
}
